/******/ (() => { // webpackBootstrap var __webpack_exports__ = {}; /*!**************************************************!*\ !*** ./resources/js/design_1/parts/show_blog.js ***! \**************************************************/ (function ($) { "use strict"; $(document).ready(function () { var $bottomFixedCard = $('.post-bottom-fixed-card'); var $bottomFixedProgress = $('.post-bottom-fixed-card__progress'); $(document).scroll(function () { var scrollTop = $(this).scrollTop(); if (scrollTop > 500) { $bottomFixedCard.addClass('show'); } else { $bottomFixedCard.removeClass('show'); } updateProgressBar(); }); function updateProgressBar() { var scrollTop = $(window).scrollTop(); var scrollHeight = $(document).height(); var clientHeight = $(window).height(); // Calculate the scroll percentage var scrollPercentage = scrollTop / (scrollHeight - clientHeight) * 100; // Update the width of the progress bar $bottomFixedProgress.find('.progress-line').css('width', scrollPercentage + '%'); } }); /** * Share Modal * */ $('body').on('click', '.js-share-post', function (e) { e.preventDefault(); var path = $(this).attr("data-path"); handleBasicModal(path, shareLang, function (result, $body, $footer) { $footer.addClass('d-none'); }, '', '40rem'); }); })(jQuery); /******/ })() ;